import HomePage from ':/pages/HomePage';
import React from 'react';
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import { ERoutePath } from './const';
import LoginPage from ':/pages/LoginPage';
import Auth from ':/wrapper/Auth';

const router = createBrowserRouter([
  {
    path: ERoutePath.HOME,
    element: <Auth><HomePage /></Auth>,
  },
  {
    path: ERoutePath.LOGIN,
    element: <LoginPage />
  },
  {
    path: '*',
    element: <Auth><HomePage /></Auth>,
  }
]);

const AppRoutes = () => {
  return <RouterProvider router={router} />;
};

export default AppRoutes;